#include<string>
#include<iostream>
using namespace std;
int main()
{
	string str1, str2, str3;
	cout << "input three line of string:" << endl;
	getline(cin, str1);
	getline(cin, str2);
	getline(cin, str3);

	void change(string&, string&);

	if (str1 > str2)
		change(str1, str2);
	if (str1 > str3)
		change(str1, str3);
	if (str2 > str3)
		change(str2, str3);
	cout << "now the order is:" << endl;
	cout << str1 << endl << str2 << endl << str3 << endl;
	return 0;
}
void change(string& st1, string& st2)
{
	string st;
	st = st1;
	st1 = st2;
	st2 = st;

}